#import "handle.h"

#import "mgr_game_physics.h"

bool g_FlagChinese;
bool g_FlagCheckRate;
CGSize g_ScrrenSize;
CGPoint g_ScrrenCenter;
float g_ContentScalerFactor;

/*dummy
*/
int g_SpriteDummyType;

/*menu
*/
SceneMenu *g_SceneMenu;

/*game
*/
SceneGame *g_SceneGame;
float g_ParabolaScaleRatio = 96.0f;
float g_ParabolaSpeedScaleRatio;

/*library
*/
SceneLibrary *g_SceneLibrary;

/*mission
*/
bool g_ChpaterComicPrev;
int g_ChapterMissionID;
int g_ChapterNextMissionID;

void InitParabolaSpeedRatio(float Distance, float MaxMove)
{
	float _RealDistance;
	float _Speed;

	_RealDistance = Distance / CMgrGamePhysics::Ratio();
	_Speed = sqrt(2 * G * _RealDistance);
	g_ParabolaSpeedScaleRatio = _Speed / MaxMove;
}

CGPoint ConvertPositionInPixelsToPosition(CGPoint PositionInPixels)
{
	return ptScalePoint_same(PositionInPixels, 1 / g_ContentScalerFactor);
}

CGPoint ConvertPositionToPositionInPixels(CGPoint Position)
{
	return ptScalePoint_same(Position, g_ContentScalerFactor);
}
